/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.psi.action.product;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.talent.util.data.PdfUtil;
import cn.javaxc.psi.mapper.product.ProductMapper;
public class ProductAction extends BaseAction
{
    @Autowired(required=false)
	private ProductMapper mapper;
    /**
    产品明细
    */
    
    public Map productDet() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce=mapper.produce(params);
        SQLMap produce_emt=produce.getExistfirst();
        result.put("produce", produce_emt);
        
        
        SQLList<SQLMap> list_produuctype=mapper.list_produuctype(params);
        result.put("list_produuctype", list_produuctype);
        
        return result;
    }
    /**
    产品修改
    */
    
    public Map productUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("l_class_treecols");
        tb.setPid(1);
        SQLList<SQLMap> l_class=mapper.l_class(params);
        l_class = l_class.buildTree(tb,tb.getPid());
        result.put("l_class", l_class);
        
        
        SQLList<SQLMap> produce=mapper.produce(params);
        SQLMap produce_emt=produce.getExistfirst();
        result.put("produce", produce_emt);
        
        
        SQLList<SQLMap> list_produuctype=mapper.list_produuctype(params);
        result.put("list_produuctype", list_produuctype);
        
        
        SQLList<SQLMap> s_produce_series=mapper.s_produce_series(params);
        result.put("s_produce_series", s_produce_series);
        
        return result;
    }
    /**
    产品增加
    */
    
    public Map productAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        SQLList<SQLMap> list_produuctype=mapper.list_produuctype(params);
        result.put("list_produuctype", list_produuctype);
        
        
        result.put("product_info", create_code(getParameter("CMID5"),"product_barcode"));
        
        
        tb = createTreeBean("l_class_treecols");
        tb.setPid(1);
        SQLList<SQLMap> l_class=mapper.l_class(params);
        l_class = l_class.buildTree(tb,tb.getPid());
        result.put("l_class", l_class);
        
        
        SQLList<SQLMap> s_produce_series=mapper.s_produce_series(params);
        result.put("s_produce_series", s_produce_series);
        
        return result;
    }
    /**
    历史记录
    */
    
    public Map productRecord() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce=mapper.produce(params);
        result.put("produce", produce);
        
        
        SQLList<SQLMap> list_produuctype=mapper.list_produuctype(params);
        result.put("list_produuctype", list_produuctype);
        
        return result;
    }
    /**
    市场定位
    */
    
    public Map productLocation() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce=mapper.produce(params);
        SQLMap produce_emt=produce.getExistfirst();
        result.put("produce", produce_emt);
        
        return result;
    }
    /**
    增加市场定为
    */
    
    public Map productLocationAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce=mapper.produce(params);
        SQLMap produce_emt=produce.getExistfirst();
        result.put("produce", produce_emt);
        
        return result;
    }
    /**
    价格体系
    */
    
    public Map productPrice() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_info=mapper.s_info(params);
        result.put("s_info", s_info);
        
        
        SQLList<SQLMap> sa_info=mapper.sa_info(params);
        SQLMap sa_info_emt=sa_info.getExistfirst();
        result.put("sa_info", sa_info_emt);
        
        
        SQLList<SQLMap> max_info=mapper.max_info(params);
        SQLMap max_info_emt=max_info.getExistfirst();
        result.put("max_info", max_info_emt);
        
        
        SQLList<SQLMap> produce=mapper.produce(params);
        SQLMap produce_emt=produce.getExistfirst();
        result.put("produce", produce_emt);
        
        
        SQLList<SQLMap> s_crate=mapper.s_crate(params);
        result.put("s_crate", s_crate);
        
        
        
        
        SQLList<SQLMap> s_price=mapper.s_price(params);
        result.put("s_price", s_price);
        
        return result;
    }
    /**
    价格添加
    */
    
    public Map productPriceAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_crate=mapper.s_crate(params);
        SQLMap s_crate_emt=s_crate.getExistfirst();
        result.put("s_crate", s_crate_emt);
        
        return result;
    }
    /**
    价格设置
    */
    
    public Map productPriceSet() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_sys=mapper.s_sys(params);
        SQLMap s_sys_emt=s_sys.getExistfirst();
        result.put("s_sys", s_sys_emt);
        
        
        SQLList<SQLMap> s_crate=mapper.s_crate(params);
        result.put("s_crate", s_crate);
        
        
        SQLList<SQLMap> s_system=mapper.s_system(params);
        result.put("s_system", s_system);
        
        return result;
    }
    /**
    价格修改
    */
    
    public Map productPriceUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> price=mapper.price(params);
        SQLMap price_emt=price.getExistfirst();
        result.put("price", price_emt);
        
        return result;
    }
    /**
    产品预警值
    */
    
    public Map productWarning() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_waring=mapper.t_waring(params);
        SQLMap t_waring_emt=t_waring.getExistfirst();
        result.put("t_waring", t_waring_emt);
        
        
        SQLList<SQLMap> t_cycle=mapper.t_cycle(params);
        SQLMap t_cycle_emt=t_cycle.getExistfirst();
        result.put("t_cycle", t_cycle_emt);
        
        
        SQLList<SQLMap> s_economic=mapper.s_economic(params);
        result.put("s_economic", s_economic);
        
        
        SQLList<SQLMap> s_goods=mapper.s_goods(params);
        result.put("s_goods", s_goods);
        
        return result;
    }
    /**
    预警值修改
    */
    
    public Map productWarningUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_waring=mapper.t_waring(params);
        SQLMap t_waring_emt=t_waring.getExistfirst();
        result.put("t_waring", t_waring_emt);
        
        return result;
    }
    /**
    产品图片
    */
    
    public Map productPicture() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> image=mapper.image(params);
        result.put("image", image);
        
        return result;
    }
    /**
    工艺管理
    */
    
    public Map processManagement() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_product=mapper.t_product(params);
        result.put("t_product", t_product);
        
        return result;
    }
    /**
    检测流程图
    */
    
    public Map detectionFlow() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        Object plan_name =mapper.plan_name(params);
        result.put("plan_name", plan_name);
        
        
        SQLList<SQLMap> steps=mapper.steps(params);
        result.put("steps", steps);
        
        
        SQLList<SQLMap> skips=mapper.skips(params);
        result.put("skips", skips);
        
        return result;
    }
    /**
    检测列表
    */
    
    public Map checklist() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_step=mapper.s_step(params);
        result.put("s_step", s_step);
        
        return result;
    }
    /**
    包装运输
    */
    
    public Map productTransport() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_pack=mapper.s_pack(params);
        SQLMap s_pack_emt=s_pack.getExistfirst();
        result.put("s_pack", s_pack_emt);
        
        return result;
    }
    /**
    修改
    */
    
    public Map productTransportUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_pack=mapper.s_pack(params);
        SQLMap s_pack_emt=s_pack.getExistfirst();
        result.put("s_pack", s_pack_emt);
        
        return result;
    }
    /**
    产品配置
    */
    
    public Map productConfigure() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> producecfg=mapper.producecfg(params);
        result.put("producecfg", producecfg);
        
        
        SQLList<SQLMap> s_total=mapper.s_total(params);
        SQLMap s_total_emt=s_total.getExistfirst();
        result.put("s_total", s_total_emt);
        
        
        SQLList<SQLMap> s_info=mapper.s_info(params);
        SQLMap s_info_emt=s_info.getExistfirst();
        result.put("s_info", s_info_emt);
        
        return result;
    }
    /**
    选择
    */
    
    public Map productConfigureChoice() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> p_produce=mapper.p_produce(params,pagination);
        p_produce.setPagedListInfo(pagination);
        result.put("p_produce", p_produce);
        
        
        SQLList<SQLMap> classid=mapper.classid(params);
        result.put("classid", classid);
        
        
        SQLList<SQLMap> s_tree_menu=mapper.s_tree_menu(params);
        result.put("s_tree_menu", s_tree_menu);
        
        return result;
    }
    /**
    增加
    */
    
    public Map productConfigureAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        return result;
    }
    /**
    修改
    */
    
    public Map productConfigureUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_num=mapper.s_num(params);
        SQLMap s_num_emt=s_num.getExistfirst();
        result.put("s_num", s_num_emt);
        
        return result;
    }
    /**
    销售信息
    */
    
    public Map productSale() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce=mapper.produce(params);
        result.put("produce", produce);
        
        return result;
    }
    /**
    门户网站
    */
    
    public Map productGateway() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> product=mapper.product(params);
        SQLMap product_emt=product.getExistfirst();
        result.put("product", product_emt);
        
        return result;
    }
    /**
    技术要求
    */
    
    public Map productTec() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        params.def("CMSEL","'文档'");
        params.def("CMID9",-1);
        Object CMID9 =mapper.CMID9(params);
        result.put("CMID9", CMID9);
        
        
        params.def("CMID9",-1);
        SQLList<SQLMap> s_folder=mapper.s_folder(params);
        result.put("s_folder", s_folder);
        
        
        params.def("CMID9",-1);
        SQLList<SQLMap> s_file=mapper.s_file(params);
        result.put("s_file", s_file);
        
        
        SQLList<SQLMap> cate=mapper.cate(params);
        SQLMap cate_emt=cate.getExistfirst();
        result.put("cate", cate_emt);
        
        
        params.def("CMID9",-1);
        SQLList<SQLMap> s_tree_menu=mapper.s_tree_menu(params);
        result.put("s_tree_menu", s_tree_menu);
        
        return result;
    }
    /**
    增加新文件
    */
    
    public Map productTecFile() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        result.put("file_admin", create_code(7,"file_num"));
        
        return result;
    }
    /**
    创建Office文件
    */
    
    public Map productOfficeTecFileBuild() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> newfile=mapper.newfile(params);
        SQLMap newfile_emt=newfile.getExistfirst();
        result.put("newfile", newfile_emt);
        
        return result;
    }
    /**
    编辑Office文件
    */
    
    public Map productOfficeTecFileWrite() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> filever=mapper.filever(params);
        SQLMap filever_emt=filever.getExistfirst();
        result.put("filever", filever_emt);
        
        
        
        return result;
    }
    /**
    文件版本
    */
    
    public Map productTecVersion() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> filever=mapper.filever(params);
        result.put("filever", filever);
        
        
        SQLList<SQLMap> file=mapper.file(params);
        SQLMap file_emt=file.getExistfirst();
        result.put("file", file_emt);
        
        return result;
    }
    /**
    选择文件
    */
    
    public Map productTecFilesChoice() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_files=mapper.s_files(params,pagination);
        s_files.setPagedListInfo(pagination);
        result.put("s_files", s_files);
        
        return result;
    }
    /**
    产品文件
    */
    
    public Map productFiles() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMID9",-1);
        Object CMID9 =mapper.CMID9(params);
        result.put("CMID9", CMID9);
        
        
        
        
        SQLList<SQLMap> s_folder=mapper.s_folder(params);
        result.put("s_folder", s_folder);
        
        
        SQLList<SQLMap> s_file=mapper.s_file(params);
        result.put("s_file", s_file);
        
        
        SQLList<SQLMap> cate=mapper.cate(params);
        SQLMap cate_emt=cate.getExistfirst();
        result.put("cate", cate_emt);
        
        
        SQLList<SQLMap> s_tree_menu=mapper.s_tree_menu(params);
        result.put("s_tree_menu", s_tree_menu);
        
        return result;
    }
    /**
    文件版本
    */
    
    public Map productFilesVersion() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_file_version=mapper.s_file_version(params);
        result.put("s_file_version", s_file_version);
        
        return result;
    }
    /**
    生产信息
    */
    
    public Map productProduceInfo() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_plan=mapper.s_plan(params,pagination);
        s_plan.setPagedListInfo(pagination);
        result.put("s_plan", s_plan);
        
        return result;
    }
    /**
    采购信息
    */
    
    public Map productPurchaseInfo() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_task=mapper.t_task(params);
        result.put("t_task", t_task);
        
        return result;
    }
    /**
    查看明细
    */
    
    public Map checkDetails() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_task=mapper.t_task(params);
        SQLMap t_task_emt=t_task.getExistfirst();
        result.put("t_task", t_task_emt);
        
        return result;
    }
    /**
    检测信息
    */
    
    public Map productCheckInfo() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        
        
        SQLList<SQLMap> s_work=mapper.s_work(params);
        result.put("s_work", s_work);
        
        return result;
    }
    /**
    增加质量记录
    */
    
    public Map increaseQualityRecords() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        Object CMCLASSID =mapper.CMCLASSID(params);
        result.put("CMCLASSID", CMCLASSID);
        
        
        SQLList<SQLMap> s_record_table=mapper.s_record_table(params);
        SQLMap s_record_table_emt=s_record_table.getExistfirst();
        result.put("s_record_table", s_record_table_emt);
        
        return result;
    }
    /**
    质量记录明细
    */
    
    public Map detailedQuality() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_record_work=mapper.s_record_work(params);
        SQLMap s_record_work_emt=s_record_work.getExistfirst();
        result.put("s_record_work", s_record_work_emt);
        
        
        SQLList<SQLMap> record=mapper.record(params);
        result.put("record", record);
        
        return result;
    }
    /**
    修改质量记录
    */
    
    public Map detailedQualityModif() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_record_work=mapper.s_record_work(params);
        SQLMap s_record_work_emt=s_record_work.getExistfirst();
        result.put("s_record_work", s_record_work_emt);
        
        
        SQLList<SQLMap> record=mapper.record(params);
        result.put("record", record);
        
        return result;
    }
    /**
    公共文件
    */
    
    public Map productPubFile() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> file_admin=mapper.file_admin(params);
        result.put("file_admin", file_admin);
        
        
        SQLList<SQLMap> s_deploy=mapper.s_deploy(params);
        result.put("s_deploy", s_deploy);
        
        return result;
    }
    /**
    增加文件
    */
    
    public Map productPubFileAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        result.put("file_admin", create_code(7,"file_num"));
        
        return result;
    }
    /**
    文件审批
    */
    
    public Map productApprovalFile() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_flow=mapper.s_flow(params);
        result.put("s_flow", s_flow);
        
        return result;
    }
    /**
    生产作业
    */
    
    public Map productTask() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> steps=mapper.steps(params);
        result.put("steps", steps);
        
        return result;
    }
    /**
    即时监控
    */
    
    public Map productMonitor() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> steps=mapper.steps(params);
        result.put("steps", steps);
        
        
        SQLList<SQLMap> skips=mapper.skips(params);
        result.put("skips", skips);
        
        return result;
    }
    /**
    子流程图
    */
    
    public Map productFlowLower() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMFLOWWORKID",-1);
        SQLList<SQLMap> s_flow=mapper.s_flow(params);
        result.put("s_flow", s_flow);
        
        return result;
    }
    /**
    增加工序流程
    */
    
    public Map productProceFlowAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_flow=mapper.s_flow(params);
        SQLMap s_flow_emt=s_flow.getExistfirst();
        result.put("s_flow", s_flow_emt);
        
        
        params.def("CMFLOWWORKID",-1);
        SQLList<SQLMap> s_parent=mapper.s_parent(params);
        SQLMap s_parent_emt=s_parent.getExistfirst();
        result.put("s_parent", s_parent_emt);
        
        return result;
    }
    /**
    产品修改修改
    */
    
    public Map productUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int u_info = mapper.u_info(params);
        result.put("u_info", u_info);
        
        return result;
    }
    /**
    产品增加修改
    */
    
    public Map productAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID = mapper.CMID(params);
        result.put("CMID", CMID);
        
        
        int i_pack = mapper.i_pack(params);
        result.put("i_pack", i_pack);
        
        return result;
    }
    /**
    增加市场定为修改
    */
    
    public Map productLocationAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int u_produce = mapper.u_produce(params);
        result.put("u_produce", u_produce);
        
        return result;
    }
    /**
    价格体系修改
    */
    
    public Map productPriceSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.productPriceSubmit(params);
        
        return result;
    }
    /**
    价格添加修改
    */
    
    public Map productPriceAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("price_system")){
            params=new SQLParam(request,emt.getMap());
            mapper.CMID3(params);
        }
        
        return result;
    }
    /**
    价格设置修改
    */
    
    public Map productPriceSetSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int d_price = mapper.d_price(params);
        result.put("d_price", d_price);
        
        
        for (SQLMap emt:hqlBean.getTableElements("price_system")){
            params=new SQLParam(request,emt.getMap());
            mapper.productPriceSetSubmit(params);
        }
        
        return result;
    }
    /**
    */
    
    public Map d_economic() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_economic(params);
        
        return result;
    }
    /**
    预警值修改修改
    */
    
    public Map productWarningUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        Object product_exists =
        mapper.product_exists(params);
        result.put("product_exists", product_exists);
        
        
        mapper.productWarningUpSubmit(params);
        
        return result;
    }
    /**
    增加经济批量修改
    */
    
    public Map increasingEconomicSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int i = mapper.i(params);
        result.put("i", i);
        
        return result;
    }
    /**
    */
    
    public Map d_file() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_file(params);
        
        return result;
    }
    /**
    */
    
    public Map u_file() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.u_file(params);
        
        return result;
    }
    /**
    增加图片修改
    */
    
    public Map productPictureAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int i_file_admin = mapper.i_file_admin(params);
        result.put("i_file_admin", i_file_admin);
        
        return result;
    }
    /**
    检测流程图修改
    */
    
    public Map detectionFlowSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        TreeTableHelper.parseFlowJson(context,request.getParameter("pathInfo"));
        
        
        for (SQLMap emt:hqlBean.getTableElements("")){
            params=new SQLParam(request,emt.getMap());
            mapper.detectionFlowSubmit(params);
        }
        
        return result;
    }
    /**
    */
    
    public Map d_plan_step() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_plan_step(params);
        
        return result;
    }
    /**
    修改修改
    */
    
    public Map productTransportUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int u_pack = mapper.u_pack(params);
        result.put("u_pack", u_pack);
        
        return result;
    }
    /**
    */
    
    public Map d_num() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_num(params);
        
        return result;
    }
    /**
    选择修改
    */
    
    public Map productConfigureChoiceSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("product_numcount")){
            params=new SQLParam(request,emt.getMap());
            mapper.productConfigureChoiceSubmit(params);
        }
        
        
        int u_price = mapper.u_price(params);
        result.put("u_price", u_price);
        
        return result;
    }
    /**
    增加修改
    */
    
    public Map productConfigureAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.productConfigureAddSubmit(params);
        
        return result;
    }
    /**
    修改修改
    */
    
    public Map productConfigureUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int u_num = mapper.u_num(params);
        result.put("u_num", u_num);
        
        return result;
    }
    /**
    */
    
    public Map u_online() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.u_online(params);
        
        return result;
    }
    /**
    */
    
    public Map u_unonline() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.u_unonline(params);
        
        return result;
    }
    /**
    */
    
    public Map d_files() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_files(params);
        
        return result;
    }
    /**
    */
    
    public Map d_link() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_link(params);
        
        return result;
    }
    /**
    */
    
    public Map d_folder() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_folder(params);
        
        return result;
    }
    /**
    增加新文件修改
    */
    
    public Map productTecFileSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int i_file_admin = mapper.i_file_admin(params);
        result.put("i_file_admin", i_file_admin);
        
        return result;
    }
    /**
    新文件夹修改
    */
    
    public Map productTecAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMID",null);
        params.def("CMID9",-1);
        int i_folder = mapper.i_folder(params);
        result.put("i_folder", i_folder);
        
        return result;
    }
    /**
    选择文件修改
    */
    
    public Map productTecFilesChoiceSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("file_deploy")){
            params=new SQLParam(request,emt.getMap());
            mapper.bu_file(params);
        }
        
        return result;
    }
    /**
    */
    
    public Map d_work() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_work(params);
        
        return result;
    }
    /**
    增加质量记录修改
    */
    
    public Map increaseQualityRecordsSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMIDrecord_work_id = mapper.CMIDrecord_work_id(params);
        result.put("CMIDrecord_work_id", CMIDrecord_work_id);
        
        
        mapper.increaseQualityRecordsSubmit(params);
        
        
        for (SQLMap emt:SQL.foreach(hqlBean.getRecord(),"name","value")){
            params=new SQLParam(request,emt.getMap());
            mapper.b_item_work(params);
        }
        
        return result;
    }
    /**
    */
    
    public Map onInsertFile() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        Object name =
        mapper.name(params);
        result.put("name", name);
        
        
        PdfUtil.writePdfContext(context,name+".pdf");
        
        return result;
    }
    /**
    修改质量记录修改
    */
    
    public Map detailedQualityModifSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.detailedQualityModifSubmit(params);
        
        
        for (SQLMap emt:SQL.foreach(hqlBean.getRecord(),"name","value")){
            params=new SQLParam(request,emt.getMap());
            mapper.b_item_work(params);
        }
        
        return result;
    }
    /**
    增加文件修改
    */
    
    public Map productPubFileAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int i_file_admin = mapper.i_file_admin(params);
        result.put("i_file_admin", i_file_admin);
        
        return result;
    }
    /**
    步骤状态修改
    */
    
    public Map productStepSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.productStepSubmit(params);
        
        return result;
    }
    /**
    增加工序流程修改
    */
    
    public Map productProceFlowAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMFLOWWORKID",-1);
        params.def("CMSTEPWORKID",-1);
        int plan_work_id = mapper.plan_work_id(params);
        result.put("plan_work_id", plan_work_id);
        
        
        int action_phase_id = mapper.action_phase_id(params);
        result.put("action_phase_id", action_phase_id);
        
        
        int action_step_id = mapper.action_step_id(params);
        result.put("action_step_id", action_step_id);
        
        
        mapper.productProceFlowAddSubmit(params);
        
        return result;
    }
}